package com.banan.Controller;

import com.banan.entity.SercetTable;
import com.banan.service.ISercetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Created by gls on 2016/8/5.
 */
@Controller
public class SercetConntroller {
    @Autowired
    private ISercetService iSercetService;

    @ResponseBody
    @RequestMapping("/CreateSercet")
    public String createSercet(HttpServletRequest Request, SercetTable sercetTable) {
        List<SercetTable> lists=new ArrayList<SercetTable>();
        lists.add(sercetTable);
        boolean boo=iSercetService.createSercet(lists);
        if(boo){
            return "success";
        }
        return "fail";
    }
}
